#!/usr/bin/make -f

include /usr/share/cdbs/1/class/ant.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk

JAVA_HOME 		:= /usr/lib/jvm/java-gcj
DEB_ANT_BUILD_TARGET	:= all
DEB_JARS		:= basicplayer commons-logging jlayer kj_dsp tritonus_share

build/jlgui:: $(EXTRATARGET)
	pod2man -c 'jlgui for Debian GNU/Linux' \
	  -r jlgui-$(DEB_UPSTREAM_VERSION) debian/jlgui.pod > debian/jlgui.1

install/jlgui::
	install -D -m644 jlgui*.jar $(DEB_DESTDIR)/usr/share/java/jlgui-$(DEB_UPSTREAM_VERSION).jar
	dh_link /usr/share/java/jlgui-$(DEB_UPSTREAM_VERSION).jar /usr/share/java/jlgui.jar
	install -D -m755 debian/jlgui.sh $(DEB_DESTDIR)/usr/bin/jlgui

clean::
	$(RM) debian/jlgui.1

get-orig-source:
	uscan --upstream-version 0 --rename
